home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / X11 / Xaw / TreeP.h < prev    next >
C/C++ Source or Header  |  2006-04-12  |  5KB  |  142 lines

  1. /*
  2.  * $Xorg: TreeP.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $
  3.  *
  4.  
  5. Copyright 1990, 1998  The Open Group
  6.  
  7. Permission to use, copy, modify, distribute, and sell this software and its
  8. documentation for any purpose is hereby granted without fee, provided that
  9. the above copyright notice appear in all copies and that both that
  10. copyright notice and this permission notice appear in supporting
  11. documentation.
  12.  
  13. The above copyright notice and this permission notice shall be included in
  14. all copies or substantial portions of the Software.
  15.  
  16. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  19. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  20. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22.  
  23. Except as contained in this notice, the name of The Open Group shall not be
  24. used in advertising or otherwise to promote the sale, use or other dealings
  25. in this Software without prior written authorization from The Open Group.
  26.  
  27.  * Copyright 1989 Prentice Hall
  28.  *
  29.  * Permission to use, copy, modify, and distribute this software for any
  30.  * purpose and without fee is hereby granted, provided that the above
  31.  * copyright notice appear in all copies and that both the copyright notice
  32.  * and this permission notice appear in supporting documentation.
  33.  * 
  34.  * Prentice Hall and the authors disclaim all warranties with regard
  35.  * to this software, including all implied warranties of merchantability and
  36.  * fitness.  In no event shall Prentice Hall or the authors be liable
  37.  * for any special, indirect or cosequential damages or any damages whatsoever
  38.  * resulting from loss of use, data or profits, whether in an action of
  39.  * contract, negligence or other tortious action, arising out of or in
  40.  * connection with the use or performance of this software.
  41.  * 
  42.  * Authors:  Jim Fulton, MIT X Consortium,
  43.  *           based on a version by Douglas Young, Prentice Hall
  44.  * 
  45.  * This widget is based on the Tree widget described on pages 397-419 of
  46.  * Douglas Young's book "The X Window System, Programming and Applications 
  47.  * with Xt OSF/Motif Edition."  The layout code has been rewritten to use
  48.  * additional blank space to make the structure of the graph easier to see
  49.  * as well as to support vertical trees.
  50.  */
  51. /* $XFree86: xc/lib/Xaw/TreeP.h,v 1.6 2001/01/17 19:42:35 dawes Exp $ */
  52.  
  53.  
  54. #ifndef _XawTreeP_h
  55. #define _XawTreeP_h
  56.  
  57. #include <X11/Xaw/Tree.h>
  58.  
  59. typedef struct _TreeClassPart {
  60.     XtPointer extension;
  61. } TreeClassPart;
  62.  
  63. typedef struct _TreeClassRec {
  64.     CoreClassPart core_class;
  65.     CompositeClassPart composite_class;
  66.     ConstraintClassPart constraint_class;
  67.     TreeClassPart tree_class;
  68. } TreeClassRec;
  69.  
  70. extern TreeClassRec treeClassRec;
  71.  
  72. typedef struct {
  73.     /* fields available through resources */
  74.     Dimension hpad;            /* hSpace/HSpace */
  75.     Dimension vpad;            /* vSpace/VSpace */
  76.     Dimension line_width;        /* lineWidth/LineWidth */
  77.     Pixel foreground;            /* foreground/Foreground */
  78.     XtGravity gravity;            /* gravity/Gravity */
  79.     Boolean auto_reconfigure;        /* autoReconfigure/AutoReconfigure */
  80.     /* private fields */
  81.     GC gc;                /* used to draw lines */
  82.     Widget tree_root;            /* hidden root off all children */
  83.     Dimension *largest;            /* list of largest per depth */
  84.     int n_largest;            /* number of elements in largest */
  85.     Dimension maxwidth, maxheight;    /* for shrink wrapping */
  86. #ifndef OLDXAW
  87.     XawDisplayList *display_list;
  88.     XtPointer pad[4];    /* for future use and keep binary compatability */
  89. #endif
  90. } TreePart;
  91.  
  92.  
  93. typedef struct _TreeRec {
  94.     CorePart core;
  95.     CompositePart composite;
  96.     ConstraintPart constraint;
  97.     TreePart tree;
  98. }  TreeRec;
  99.  
  100.  
  101. /*
  102.  * structure attached to all children
  103.  */
  104. typedef struct _TreeConstraintsPart {
  105.     /* resources */
  106.     Widget parent;            /* treeParent/TreeParent */
  107.     GC gc;                /* treeGC/TreeGC */
  108.     /* private data */
  109.     Widget *children;
  110.     int n_children;
  111.     int max_children;
  112.     Dimension bbsubwidth, bbsubheight;    /* bounding box of sub tree */
  113.     Dimension bbwidth, bbheight;    /* bounding box including node */
  114.     Position x, y;
  115. #ifndef OLDXAW
  116.     XtPointer pad[2];    /* leave some space for future optimizations, and
  117.              * keep binary compatability
  118.              */
  119. #endif
  120. } TreeConstraintsPart;
  121.  
  122. typedef struct _TreeConstraintsRec {
  123.    TreeConstraintsPart tree;
  124. } TreeConstraintsRec, *TreeConstraints;
  125.  
  126.  
  127. /*
  128.  * useful macros
  129.  */
  130.  
  131. #define TREE_CONSTRAINT(w) \
  132.                    ((TreeConstraints)((w)->core.constraints))
  133.  
  134. #define TREE_INITIAL_DEPTH 10        /* for allocating largest array */
  135. #define TREE_HORIZONTAL_DEFAULT_SPACING 20
  136. #define TREE_VERTICAL_DEFAULT_SPACING 6
  137.  
  138. #endif /* _XawTreeP_h */
  139.  
  140.  
  141.  
  142.